<?php
namespace app\index\controller;
use think\Db;
use think\Controller;
class Business extends Controller{
	// 主营业务分类列表
	public function businessTypeList(){
		$logo = Db::name('navigation_logo')->where('type = 1')->value('logo');
		$list = Db::name('business')->field('id,title')->select();
		echo json_encode(['code' => 0,'msg' => '获取成功','logo' => $logo,'typeList'=> $list]);
	}
	// 主营业务详情
	public function busindessInfo(){
		$bid = input('post.bid');
		if(empty($bid)){
			echo json_encode(['code' => 1,'msg' => '缺少分类id']);
			exit;
		}
		$where['id'] = array('EQ',$bid);
		$info = Db::name('business')->where($where)->value('info');
		echo json_encode(['code' => 0,'msg' => '获取成功','info' => $info]);
	}
}